namespace RBAC.Read.Api.Application.Command.DataBashboard
{
    using MediatR;
    using RBAC.ErrorCode;
    using RBAC.Read.Api.Application.Dto.DataBashboard;

    /// <summary>
    /// 产品报工 分页查询 命令
    /// </summary>
    public class GetProductionDashboardPageCommand : IRequest<APIPaging<ProductionDashboardListDto>>
    {
        /// <summary>
        /// 页码，默认第1页
        /// </summary>
        public int PageIndex { get; set; } = 1;

        /// <summary>
        /// 每页数量，默认10条
        /// </summary>
        public int PageSize { get; set; } = 10;

        /// <summary>
        /// 产品名称（模糊查询）
        /// </summary>
        public string? ProductName { get; set; }

        /// <summary>
        /// 报工开始时间（包含）
        /// </summary>
        public DateTime? StartTime { get; set; }

        /// <summary>
        /// 报工结束时间（包含）
        /// </summary>
        public DateTime? EndTime { get; set; }

        /// <summary>
        /// 最小报工数量（用于筛选大批量报工）
        /// </summary>
        public int? MinReportQty { get; set; }

        /// <summary>
        /// 最小合格数量（用于筛选合格率）
        /// </summary>
        public int? MinQualifiedQty { get; set; }

        /// <summary>
        /// 排序，默认按报工时间倒序
        /// </summary>
        public string OrderBy { get; set; } = "ReportTime DESC";
    }
}
